<?php

namespace App\Models\City;

class Zone extends \App\Libs\Base\BaseModel
{
    protected $__TABLE__ = 't_paile_zone';

    /**
     *    跳过检测了
     */
    public function beforeValidation()
    {
        //self::skipValidation([] , $this );
    }

    public function getCityArea($city)
    {
        $resultSets = $this->modelsManager->createBuilder()
            ->from('App\Models\City\Zone')
            ->where('fid=0 and city=:city:', ['city' => $city])
            ->getQuery()
            ->execute()->toArray();
        return $resultSets;
    }

    public function getZone($areaArray)
    {
        $resultSets = $this->modelsManager->createBuilder()
            ->from('App\Models\City\Zone')
            ->inWhere('fid', $areaArray)
            ->getQuery()
            ->execute()->toArray();
        return $resultSets;
    }


}
